package com.leyu.mall.service.member.impl;

import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.leyu.mall.dao.member.UserBaseMapper;
import com.leyu.mall.domain.member.UserBase;
import com.leyu.mall.service.member.IUserBaseService;

@Service
@Transactional(rollbackFor=Exception.class)
public class UserBaseServiceImpl implements IUserBaseService
{
	
	@Resource
	private UserBaseMapper userBaseMapper;
	
	
	
	 public int addUserBase(UserBase record){
		 return this.userBaseMapper.addUserBase(record);
	 }
 	 
	 public UserBase getUserBaseById(Long goodsId){
		 return this.userBaseMapper.getUserBaseById(goodsId);
		 
	 }
	 
	 public int updateByPrimaryKey(UserBase record){
		 return this.userBaseMapper.updateByPrimaryKey(record);
		 
	 }
	 public UserBase ifLogin(UserBase record){
		 Map map = new HashMap();
		 map.put("userName", record.getUserName());
		 map.put("password", record.getPassword());
		 
		 return this.userBaseMapper.ifLogin(map);
		 
	 }
}
